﻿using Blm.RabbitMQ.Models;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Converters;
using System;
using System.Text.Json.Serialization;
using VisionCloud.Domain.DtoModel.RabbitMq;

namespace VisionCloud.Domain.DtoModel.Inner
{
    [RabbitMQOption("surfacelog.ex", "surfacelog.add.rk", null, RabbitMQConnectPoolName.CloudServerHost, StorageWayEm.None)]
    public class SurfaceLogAddDto
    {
        /// <summary>
        /// 错误码
        /// </summary>
        public int EventId { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        public string Side { get; set; }

        /// <summary>
        /// 日志等级
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public LogLevel Level { get; set; }

        /// <summary>
        /// 程序版本号
        /// </summary>
        public string Version { get; set; }

        /// <summary>
        /// 平板设备Id
        /// </summary>
        public string MachineId { get; set; }
        /// <summary>
        /// 主机名
        /// </summary>
        public string MachineName { get; set; }

        /// <summary>
        /// 线程id
        /// </summary>
        public string ThreadId { get; set; }

        /// <summary>
        /// 进程id
        /// </summary>
        public string ProcessId { get; set; }

        /// <summary>
        /// 进程名
        /// </summary>
        public string ProcessName { get; set; }

        /// <summary>
        /// 当前时间
        /// </summary>
        public DateTime TimeStamp { get; set; }

        /// <summary>
        /// 日志时间
        /// </summary>
        public DateTime Time { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string StackTrace { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 类名
        /// </summary>
        public string ClassName { get; set; }

        /// <summary>
        /// 请求API
        /// </summary>
        public string RequestPath { get; set; }

        /// <summary>
        /// 方法名
        /// </summary>
        public string ActionName { get; set; }

        /// <summary>
        /// 拓展信息
        /// </summary>
        public object Extra { get; set; }
    }
}
